package com.example.eback.entity;

import com.example.eback.entity.Proj.Quill;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;

import javax.persistence.*;
import java.sql.Date;
import java.util.List;

/**
 * 文件类，保存了文件的各种信息
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Table(name = "uploaded_files")
@ToString
@JsonIgnoreProperties({"handler","hibernateLazyInitializer"})
public class UpLoadFile {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private int id;
    @Column(name = "user_id")
    private  int userId;
    @Column(name = "file_name")
    private  String fileName;
    @Column(name = "vent_origin_file_url")
    private  String vnetoriginfileUrl;
    @Column(name = "o_filename")
    private String origin_filename;
    @Column(name = "description")
    private  String desc_;
    @Column(name = "status")
    private  int status;//0表示创建成功，1表示上传成功，2表示分割成功
    @Column(name="model_name")
    private  Integer modelName;//有2个值，1表示用的vnet分割，2表示用nnUnet分割
    @Column(name="file_url")
    private  String fileUrl;
    @Column(name="pid")
    private  int pid ;//project的id
    @Column(name = "label_url")
    private  String labelUrl;
    @Column(name="Date")
    private Date date;
    @Column(name="avatar_file_url")
    private String avatarFileUrl;
    @Transient
    private Quill quill;

}